package com.yun.zf.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yun.zf.common.admin.dto.house.AdminHousePicDto;
import com.yun.zf.common.app.domain.ZfHousePicture;
import com.yun.zf.common.vo.Response;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 房源图片表 服务类
 * </p>
 *
 * @author cj
 * @since 2021-01-29
 */
public interface ZfHousePictureService extends IService<ZfHousePicture> {

    /**
     * 上传户房源图片
     * @param files
     * @param request
     * @param provCode
     * @param cityCode
     * @return
     */
    Response uploadHousepic(MultipartFile[] files , HttpServletRequest request, Long provCode, Long cityCode);

    /**
     * 根据类型获取图片信息
     * @param houseId
     * @param provCode
     * @param cityCode
     * @param type
     * @return
     */
    public List<AdminHousePicDto> getPics(Long houseId, Long provCode, Long cityCode, int type);


    /**
     * 获取详情图和户型图
     * @param houseId
     * @param provCode
     * @param cityCode
     * @return
     */
    public List<AdminHousePicDto> getPics(Long houseId, Long provCode, Long cityCode);

    /**
     * 验证是否存在封面图
     * @param houseId
     * @param provCode
     * @param cityCode
     * @param type
     * @return
     */
    public int delPic(Long houseId, Long provCode, Long cityCode , int type);

    Response delHousepic(String ids, Long provCode, Long cityCode);

    /**
     * 修改户型图标签
     * @param id
     * @param provCode
     * @param cityCode
     * @param pos
     * @return
     */
    Response editPospic(Long id, Long provCode, Long cityCode,String pos);

    /**
     * 实勘和户型图编辑
     * @param shikan
     * @param huxing
     * @param provinceCode
     * @param cityCode
     */
    void editShikan ( String shikan, String huxing ,Long provinceCode, Long cityCode);

    /**
     * 根据路径查询是否存在户型图
     * @param provinceCode
     * @param cityCode
     * @param path
     * @return
     */
    int   hasHuxing(Long provinceCode, Long cityCode,String path);
}
